<template>
  <div>
    <p>{{$store.state.username}}</p>
    <p>{{$store.getters.newName}}</p>
  </div>
</template>
<script>
  import { useStore } from 'vuex'
  export default {
    name: 'App',
    setup () {
      //使用vuex仓库
      const  store = useStore()
      console.log(store.state.username)
    }

  }
</script>


